1. Field of the Invention
The present invention relates to data transmission technology, and, more particularly, to a method and an apparatus for data output control.
2. Description of the Related Art
Current data forwarding devices adopt many traffic output control methods, such as the committed access rate (CAR) technology. CAR puts tokens into a token bucket at a user-specified rate and injects interesting packets into the token bucket for output control. If the token bucket has enough tokens for sending packets, CAR allows these packets to pass, puts them into the cache queue of the data output interface, and sends them out; if not, CAR discards these packets.
However, CAR has following drawbacks.
CAR injects tokens at a fixed rate, and as long as there are enough tokens, sends packets to the cache queue of the data output interface. If the data output interface is sending packets at a lower rate, the cache queue may get full, causing packets arriving at it to be discarded.
If there are not enough tokens, CAR discards the packets directly.
Both situations cause traffic interruption, which is fatal to such applications as video transmission.
Other commonly used traffic output control technologies use various types of scheduling mechanisms, such as round robin (RR) scheduling, and weighted round robin (WRR) scheduling. They are applicable to forwarding devices with multiple output interfaces, and enable all output interfaces to share the total output bandwidth. With these scheduling mechanisms, data is scheduled from data output interfaces either directly to their cache queues or after CAR identifies that it is permitted to be sent. Whichever approach is used, traffic interruption may occur when the sending rate on the data output interface is low.
In addition, current fair scheduling mechanisms cannot provide differentiated services for output interfaces, resulting in improper bandwidth assignment. Weighted scheduling mechanisms can provide weight-based differentiated services. The more weight an interface has, the more bandwidth it gets. However, because weights are manually assigned to interfaces, weighted scheduling mechanisms cannot adapt to dynamic changes.